Recently, an approach for cloning (and de-cloning of files in a file system) was described in US 2012/0130949 A1 which relates to a file cloning mechanism that allows for quickly creating copies (clones) of files within a file system, such as when a user makes a copy of a file. A clone of a source object can be at least initially represented by a structure containing references to various elements of the source object (e.g., indirect nodes, direct nodes, and data blocks). Both read-only and mutable clones can be created. The source file and the clone initially share such elements and continue to share unmodified elements as changes are made to the source file or mutable clone. None of the user data blocks or the metadata blocks describing the data stream (i.e., the indirect/direct nodes) associated with the source file need to be copied at the time the clone is created. Also, at appropriate times, cloned files may be “de-cloned.” The contents of US 2012/0130949 A1 are herewith incorporated by reference and the mechanism will be summarized in more detail below.
In a data storage system, some or all objects of a file system (e.g. a source file system) may be replicated to another file system (exemplarily referred to herein as the “target file system”), for example, to allow for archiving, backup, maintenance, or disaster recovery. Unlike data mirroring, where data is stored in two separate locations, replication of data may generally involve the creation of a copy of a source object in the target file system, wherein the target object may be stored in a manner that is quite different from the manner in which the source object is stored.
For example, the source object may be stored in non-contiguous blocks while the target object may be stored in contiguous blocks because all blocks for the target object may be allocated at one time whereas the blocks for the source object may have been allocated over an extended period of time and hence may have been allocated from different areas of storage.
Generally speaking, file system replication can be performed at the file level or at the object (sub-file) level. Examples of file-level and object-level replication are discussed generally in Hitachi NAS Platform Software: BlueArc® JetMirror datasheet available from Hitachi Data Systems.
Clone files may often be handled like any other regular files during an object-based replication and therefore may be replicated as a deep copy on the target file system. Such deep copying of the clone files results in creating clone files that do not share any data blocks with their snapshot-files, thus increasing their storage cost on the target file system.
A method of managing a file system and particularly for managing snapshots of a file system is described in U.S. Pat. No. 8,356,013 B2. However, the term “snapshot” as used for images of a file system at a certain point in time in the present specification and in the afore-mentioned document is to be distinguished clearly from what is meant by terms such as “snapshot object”, “snapshot file” or “snapshot-file object” in the context of the present specification (being a file or a file system object being managed similar to files or file objects of the file system).